package com.icart.entities;

import javax.persistence.*;
import java.math.BigDecimal;
import java.sql.Timestamp;

@Entity
@Table(name = "mk_discpack", schema = "ams", catalog = "")
public class MkDiscpackEntity {
    private long tcid;
    private String tcname;
    private String tccode;
    private String tctype;
    private Integer validmonth;
    private BigDecimal totalval;
    private BigDecimal saleprice;
    private BigDecimal presentval;
    private String limitchn;
    private String remark;
    private Integer stat;
    private Timestamp salestartdate;
    private Timestamp saleenddate;
    private Long opensalechn;
    private Timestamp creattime;
    private Long creatchn;
    private Long creator;

    @Id
    @Column(name = "tcid")
    public long getTcid() {
        return tcid;
    }

    public void setTcid(long tcid) {
        this.tcid = tcid;
    }

    @Basic
    @Column(name = "tcname")
    public String getTcname() {
        return tcname;
    }

    public void setTcname(String tcname) {
        this.tcname = tcname;
    }

    @Basic
    @Column(name = "tccode")
    public String getTccode() {
        return tccode;
    }

    public void setTccode(String tccode) {
        this.tccode = tccode;
    }

    @Basic
    @Column(name = "tctype")
    public String getTctype() {
        return tctype;
    }

    public void setTctype(String tctype) {
        this.tctype = tctype;
    }

    @Basic
    @Column(name = "validmonth")
    public Integer getValidmonth() {
        return validmonth;
    }

    public void setValidmonth(Integer validmonth) {
        this.validmonth = validmonth;
    }

    @Basic
    @Column(name = "totalval")
    public BigDecimal getTotalval() {
        return totalval;
    }

    public void setTotalval(BigDecimal totalval) {
        this.totalval = totalval;
    }

    @Basic
    @Column(name = "saleprice")
    public BigDecimal getSaleprice() {
        return saleprice;
    }

    public void setSaleprice(BigDecimal saleprice) {
        this.saleprice = saleprice;
    }

    @Basic
    @Column(name = "presentval")
    public BigDecimal getPresentval() {
        return presentval;
    }

    public void setPresentval(BigDecimal presentval) {
        this.presentval = presentval;
    }

    @Basic
    @Column(name = "limitchn")
    public String getLimitchn() {
        return limitchn;
    }

    public void setLimitchn(String limitchn) {
        this.limitchn = limitchn;
    }

    @Basic
    @Column(name = "remark")
    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Basic
    @Column(name = "stat")
    public Integer getStat() {
        return stat;
    }

    public void setStat(Integer stat) {
        this.stat = stat;
    }

    @Basic
    @Column(name = "salestartdate")
    public Timestamp getSalestartdate() {
        return salestartdate;
    }

    public void setSalestartdate(Timestamp salestartdate) {
        this.salestartdate = salestartdate;
    }

    @Basic
    @Column(name = "saleenddate")
    public Timestamp getSaleenddate() {
        return saleenddate;
    }

    public void setSaleenddate(Timestamp saleenddate) {
        this.saleenddate = saleenddate;
    }

    @Basic
    @Column(name = "opensalechn")
    public Long getOpensalechn() {
        return opensalechn;
    }

    public void setOpensalechn(Long opensalechn) {
        this.opensalechn = opensalechn;
    }

    @Basic
    @Column(name = "creattime")
    public Timestamp getCreattime() {
        return creattime;
    }

    public void setCreattime(Timestamp creattime) {
        this.creattime = creattime;
    }

    @Basic
    @Column(name = "creatchn")
    public Long getCreatchn() {
        return creatchn;
    }

    public void setCreatchn(Long creatchn) {
        this.creatchn = creatchn;
    }

    @Basic
    @Column(name = "creator")
    public Long getCreator() {
        return creator;
    }

    public void setCreator(Long creator) {
        this.creator = creator;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        MkDiscpackEntity that = (MkDiscpackEntity) o;

        if (tcid != that.tcid) return false;
        if (tcname != null ? !tcname.equals(that.tcname) : that.tcname != null) return false;
        if (tccode != null ? !tccode.equals(that.tccode) : that.tccode != null) return false;
        if (tctype != null ? !tctype.equals(that.tctype) : that.tctype != null) return false;
        if (validmonth != null ? !validmonth.equals(that.validmonth) : that.validmonth != null) return false;
        if (totalval != null ? !totalval.equals(that.totalval) : that.totalval != null) return false;
        if (saleprice != null ? !saleprice.equals(that.saleprice) : that.saleprice != null) return false;
        if (presentval != null ? !presentval.equals(that.presentval) : that.presentval != null) return false;
        if (limitchn != null ? !limitchn.equals(that.limitchn) : that.limitchn != null) return false;
        if (remark != null ? !remark.equals(that.remark) : that.remark != null) return false;
        if (stat != null ? !stat.equals(that.stat) : that.stat != null) return false;
        if (salestartdate != null ? !salestartdate.equals(that.salestartdate) : that.salestartdate != null)
            return false;
        if (saleenddate != null ? !saleenddate.equals(that.saleenddate) : that.saleenddate != null) return false;
        if (opensalechn != null ? !opensalechn.equals(that.opensalechn) : that.opensalechn != null) return false;
        if (creattime != null ? !creattime.equals(that.creattime) : that.creattime != null) return false;
        if (creatchn != null ? !creatchn.equals(that.creatchn) : that.creatchn != null) return false;
        if (creator != null ? !creator.equals(that.creator) : that.creator != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = (int) (tcid ^ (tcid >>> 32));
        result = 31 * result + (tcname != null ? tcname.hashCode() : 0);
        result = 31 * result + (tccode != null ? tccode.hashCode() : 0);
        result = 31 * result + (tctype != null ? tctype.hashCode() : 0);
        result = 31 * result + (validmonth != null ? validmonth.hashCode() : 0);
        result = 31 * result + (totalval != null ? totalval.hashCode() : 0);
        result = 31 * result + (saleprice != null ? saleprice.hashCode() : 0);
        result = 31 * result + (presentval != null ? presentval.hashCode() : 0);
        result = 31 * result + (limitchn != null ? limitchn.hashCode() : 0);
        result = 31 * result + (remark != null ? remark.hashCode() : 0);
        result = 31 * result + (stat != null ? stat.hashCode() : 0);
        result = 31 * result + (salestartdate != null ? salestartdate.hashCode() : 0);
        result = 31 * result + (saleenddate != null ? saleenddate.hashCode() : 0);
        result = 31 * result + (opensalechn != null ? opensalechn.hashCode() : 0);
        result = 31 * result + (creattime != null ? creattime.hashCode() : 0);
        result = 31 * result + (creatchn != null ? creatchn.hashCode() : 0);
        result = 31 * result + (creator != null ? creator.hashCode() : 0);
        return result;
    }
}
